import java.awt.*;

/**
 *  Uses the Die class to calculate damage numbers, 
 *  factoring in defensive stats of enemies.
 *
 *  @author  Michael Chang
 *  @version Apr 26, 2014
 *  @author  Period: 5
 *  @author  Assignment: FinalProject
 *
 *  @author  Sources: none
 */
public class damageCalculation
{
    Die damageDice = new Die();
    
    private Character attacker;
    private Character defender;
    private int finalDamage;
    private int healthLeft;
    
    /**
     * Calculates damage done by attacker on defender
     */
    public void damage()
    {
        finalDamage = attacker.getATK() + damageDice.getNumDots() 
                        - defender.getDEF();
    }
    
    /**
     * Calculates how much health defender has left
     */
    public void damageToHealth()
    {
        healthLeft = defender.getHP() - finalDamage;
    }
    
    // Return Statements
    
    /**
     * returns damage (normal)
     * @return finalDamage
     */
    public int getDamage()
    {
        return finalDamage;
    }
    
    /**
     * Returns amount of hit points left
     * @return healthLeft
     */
    public int getHealth()
    {
        return healthLeft;
    }
        
}
